// pages/type/type.js
import {get} from "../../until/db.js"
Page({

  /**
   * 页面的初始数据
   */
  data: {
    types:[]
  },
  async onLoad(){
    // console.log(e);
    var result = await get("class")
    // console.log(result);
    var types = result.data
    this.setData({
      types
    })
  },
  //进入分类里面的详情
  toEnter(e){
    // console.log(e);
    var id = e.currentTarget.id
    var name = e.currentTarget.dataset.name
    wx.navigateTo({
      url: '/pages/list/list?id='+id+'&name='+name,
    })
  }
 
})